using System;

namespace Entities
{
    public abstract class EBase
    {
        #region - Properties -

        public int Id {get; set; }

        #endregion

        #region - Constructor -

        public EBase()
        {
            Id = Int32.MinValue;
        }

        #endregion

        #region - Overrides -

        public override bool Equals(object obj)
        {
            if (!(obj is EBase))
                return false;

            if (!obj.GetType().Equals(GetType()))
                return false;

            EBase objBase = obj as EBase;

            return Id.Equals(objBase.Id);
        }

        #endregion
    }
}